use chrono::Local;
use chrono::format::{DelayedFormat, StrftimeItems};

pub fn datetime_str() -> String
{
    let now = Local::now();
    let fmt = "%Y-%m-%d %H:%M:%S";
    let dft: DelayedFormat<StrftimeItems> = now.format(fmt);
    let str_datetime: String = dft.to_string(); // 2021-01-04 20:02:09
    str_datetime
}